'use client';

import Modal from "@/app/_components/modal"
import { useState } from "react";
import UserPage from '@/app/user/page';
import { useRouter } from "next/navigation";

function UserPreview() {
    const [open, setOpen] = useState(true)
    const router = useRouter();
    const onClose = () => {
        // setOpen(false)
        router.push('/blog');
    }

    return (
        <div className="user-modal-wrapper">
            <Modal title="用户信息" open={open} onClose={onClose}>
                <div className="user-page-wrap">
                    <UserPage />
                    <div>
                        <button>确定</button>
                        <button>取消</button>
                    </div>

                </div>
            </Modal>
        </div>
    )
}

export default UserPreview